package UserInterface;

import Utils.Util;
import domain.Message;
import domain.PDU.PDU;
import domain.PDU.VariableBindings;

import java.util.Scanner;

/**
 * @Author: ylc
 * @Description:提供用户界面
 */
public class buildInterface {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("version: version-1 | version-2 | version-3");
        String version = sc.nextLine();
        System.out.println("community");
        String community = sc.nextLine();
        System.out.println("pdutype: get-request | get-next-request | get-response | set-request | trap");
        String pdutype = sc.nextLine();
        String requestId = Util.getNum();
        System.out.println("objectId:");
        String objectId = sc.nextLine();
        System.out.println("valueType:");
        String valueType = sc.nextLine();
        System.out.println("value:");
        String value = sc.nextLine();

        VariableBindings var1 = new VariableBindings(objectId, valueType, value);
        PDU pdu = new PDU(pdutype, requestId,"noError","noError", var1);
        Message snmp = new Message(version,community,pdu);

    }
}
